var app = new Vue({
    el:'#app',
    data:{
        asd:".."
    },
    mounted() {
        axios
            .get('js/new2.json')
            .then(function (response){
                app.asd = response.data.sss;


                var btn = document.querySelectorAll('.read-all-txt');
                var btn1 = document.querySelectorAll('#ys');
                console.log(btn1);
                console.log(btn);
                for(var i = 0;i<btn.length;i++){
                    btn[i].addEventListener('click',function(){
                        document.querySelector("#ys").style.display = "block";
                    })
                }
                    ys.addEventListener('click',function(){
                        ys.style.display = 'none'
                    })
            })

            .catch(function (error) {
            console.log(error);
        })
    }
});
var fan = document.querySelector(".fan");

    fan.addEventListener('click', function () {
        window.scrollTo({
            top: 0,
            behavior: 'smooth'
        });
    });




var swiper = new Swiper('.swiper-container', {
    effect: 'cube',
    grabCursor: true,
        autoplay:true,
    loop : true,
    cubeEffect: {
        shadow: true,
        slideShadows: true,
        shadowOffset: 20,
        shadowScale: 0.94,
    },
    pagination: {
        el: '.swiper-pagination',
    },
});




//var i = 0;
//        yx[i].addEventListener("click",function(){
//            ys[i].style.display='block';
//            i++;
//        });
//var b = 0;
//        ys[b].addEventListener("click",function(){
//            ys[b].style.display='none';
//            b++;
//        });

    //
    //yx[i].onclick = liew;

/*function liew(){
    for(var i=0;i<yx.length;i++){
        if(yx[i] === this){
            ys[i].style.display = "block";
        }else {
            ys[i].style.display = "none";
        }
    }
}*/





